libxc: cpupools: adjust retry loop in xc_cpupool_removecpu()
authorJuergen Gross <jgross@suse.com>
Fri, 15 Apr 2016 14:54:16 +0000 (16:54 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 20 Apr 2016 13:44:01 +0000 (14:44 +0100)
commit15fedd65a83da2972563c5e7e054512f799f6d55
tree42f146751d937d1aa805b6b5cab78f1d37ac493b
parent125d4beee0ea3134dd5ea9ec3f43ee38ee24a15f
libxc: cpupools: adjust retry loop in xc_cpupool_removecpu()

Commit 1ef6beea187b ("libxc: do some retries in xc_cpupool_removecpu()
for EBUSY case") added a retry loop in xc_cpupool_removecpu() for the
EBUSY case. As EBUSY was returned in multiple error situations the
loop would have been executed in situations where a retry would not
be successful. Additionally calling sleep(1) between the rerires is a
bad idea when being called in a daemon.

The hypervisor has been changed to return different error values now.
The retry added in above mentioned commit should be done in the
EADDRINUSE case now. As the error condition should last only for a
very short time, the sleep(1) call can be removed.

Requested-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Alan Robinson <alan.robinson@ts.fujitsu.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_cpupool.c